package xyz.zhzby.cyzx.cms.convert;

import io.swagger.annotations.ApiModel;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;
import xyz.zhzby.cyzx.cms.dto.response.ChannelResponse;
import xyz.zhzby.cyzx.cms.entity.Channel;

import java.util.List;

/**
 * @author zby
 * @date 2021/12/11
 */
@ApiModel("文章分栏相关转换器")
@Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface ChannelConvert {

    ChannelConvert INSTANCE = Mappers.getMapper(ChannelConvert.class);

    ChannelResponse CHANNEL_RESPONSE(Channel channel);

    List<ChannelResponse> CHANNEL_RESPONSE_LIST(List<Channel> channels);
}
